import random

def get_color():
    return random.randrange(256)

def generate_code():
    source = "qweryuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFHJJKLZXCVBNM"
    code = ""

    for i in range(4):
        code += random.choice(source)

    return code

